import type {
  BannerResult,
  CategoryResult,
  DistributionSite,
  GoodsResult,
  HotResult,
} from '@/types'
import type { ComponentParams } from '@/types/component'
import { request } from '@/utils/request'
// 首页-广告区域-小程序
// GET
// /home/banner
export const getHomeBanner = (data: DistributionSite) => {
  return request<BannerResult[]>('/home/banner', 'GET', data)
}
/**
 * 首页-前台分类-小程序
 * GET
 * /home/category/mutli
 */
export const getHomeCategory = () => {
  return request<CategoryResult[]>('/home/category/mutli', 'GET')
}
/**
 * 首页-推荐专区-小程序
 * GET
 * /home/hot/mutli
 */
export const getHomeHot = () => {
  return request<HotResult[]>('/home/hot/mutli', 'GET')
}
/**
 * 首页-猜你喜欢-小程序
 * GET
 * /home/guess/mutli
 */
export const getHomeGuess = (data: ComponentParams) => {
  return request<GoodsResult>('/home/goods/guessLike', 'GET', data)
}
